package com.leo.tool.socket;


public class Client2 {
    private static SocketClient client;

    public static void main(String[] args) throws Exception {
        client = new SocketClient();
        new Client2().func();
    }

    public void func() throws InterruptedException {
        ModelClass mc = new ModelClass();
        mc.name = "client2";
        mc.m1.add(ModelClass.Status.NA);
        mc.m2.clear();
        ModelClass.InnerModel im = new ModelClass.InnerModel();
        while (true) {
            im.value = "client2: " + System.currentTimeMillis();
            mc.m2.add(im);
            client.send(mc);
            Thread.sleep(2000);
        }
    }
}